package com.example.bicycle.domain.enums;

public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"操作成功"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    NO_OPERATOR_AUTH(403,"无权限操作"),
    SYSTEM_ERROR(500,"出现错误"),
    LOGIN_ERROR(505,"用户名或密码错误"),
    CONTENT_NOT_NULL(506,"内容不能为空"),
    //身份
    NORMAL_USER(1,"普通用户"),
    ADMIN_USER(2,"管理员"),
    //开关状态
    BIKE_SWITCH_ON(1,"开"),
    BIKE_SWITCH_OFF(0,"关"),
    //单车使用状态
    BIKE_STATUS_ON(1,"使用中"),
    BIKE_STATUS_OFF(0,"未使用");
    int code;
    String msg;

    AppHttpCodeEnum(int code, String Message){
        this.code = code;
        this.msg = Message;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
